﻿<%@ Page Language="C#" MasterPageFile="~/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="Toolkit.Web.Examples.Notification.Index" %>
<%@ Import Namespace="Toolkit.Web" %>
<%@ Import Namespace="Toolkit.Web.ViewComponents" %>
<%@ Import Namespace="Toolkit.Web.ViewComponents.Notification" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Title" runat="server">
    Notifications
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="StyleSheetIncludes" runat="server">
    <link href="/Content/StyleSheets/Notification.css" rel="stylesheet" />
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="PageContent" runat="server">

    <div class="section">
        <h2>Error Type</h2>
        <%:
            this.Toolkit()
                .Notification(NotificationType.Error)
                .Title("Error")
                .AddMessage("This is the detailed message.")
        %>
    </div>
    
    <div class="section">
        <h2>Warning Type</h2>
        <%:
            this.Toolkit()
                .Notification(NotificationType.Warning)
                .Title("Warning")
                .AddMessage("This is the detailed message.")
        %>
    </div>
    
    <div class="section">
        <h2>Success Type</h2>
        <%:
            this.Toolkit()
                .Notification(NotificationType.Success)
                .Title("Success")
                .AddMessage("This is the detailed message.")
        %>
    </div>
    
    <div class="section">
        <h2>Informative Type</h2>
        <%:
            this.Toolkit()
                .Notification(NotificationType.Informative)
                .Title("Information")
                .AddMessage("This is the detailed message.")
        %>
    </div>
    
    <div class="section">
        <h2>Func Templating</h2>
        <%:
            this.Toolkit()
                .Notification(NotificationType.Informative)
                .Title(template => { return "Informative Notification"; })
                .AddMessage(template =>
                {
                    return "Message <u>1</u>";
                })
                .AddMessage(template => "Message 2")
        %>
    </div>
    
    <div class="section">
        <h2>Action Templating</h2>
        <%:
            this.Toolkit()
                .Notification(NotificationType.Informative)
                .Title((template, writer) => { writer.Write("Informative Notification"); })
                .AddMessage((template, writer) =>
                {
                    writer.Write("Message 1");
                })
        %>
    </div>
    
    <div class="section">
        <h2>No Title</h2>
        <%:
            this.Toolkit()
                .Notification(NotificationType.Informative)
                .AddMessage("Message 1")
                .AddMessage("Message 2")
        %>
    </div>
    
    <div class="section">
        <h2>No Messages</h2>
        <%:
            this.Toolkit()
                .Notification(NotificationType.Informative)
                .Title("Informative Notification")
        %>
    </div>
    
    <div class="section">
        <h2>Stacked Notifications</h2>
        <%:
            this.Toolkit()
                .Notification(NotificationType.Warning)
                .Title("Title")
                .AddMessage("This is the detailed message.")
        %>
        <%:
            this.Toolkit()
                .Notification(NotificationType.Error)
                .Title("Title")
                .AddMessage("This is the detailed message.")
        %>
    </div>

</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="JavaScriptIncludes" runat="server">
</asp:Content>
